gl renderer: Remove an unnecessary block
authorTimm Bäder <mail@baedert.org>
Sat, 30 Dec 2017 09:01:12 +0000 (10:01 +0100)
committerTimm Bäder <mail@baedert.org>
Tue, 2 Jan 2018 07:10:06 +0000 (08:10 +0100)
gsk/gl/gskglrenderer.c

index 1c67ef3404b5217d9cf9d3c50b118a4f3439c732..8b4f7439a27a1903ddb768478cefcb91ef0ee648 100644 (file)
@@ -385,10 +385,8 @@ render_text_node (GskGLRenderer   *self,
 
       /* e.g. whitespace */
       if (glyph->draw_width <= 0 || glyph->draw_height <= 0)
-        {
-          x_position += gi->geometry.width;
-          continue;
-        }
+        goto next;
+
       cx = (double)(x_position + gi->geometry.x_offset) / PANGO_SCALE;
       cy = (double)(gi->geometry.y_offset) / PANGO_SCALE;
 
@@ -405,20 +403,17 @@ render_text_node (GskGLRenderer   *self,
       glyph_w = glyph->draw_width;
       glyph_h = glyph->draw_height;
 
-      {
-        const GskQuadVertex vertex_data[GL_N_VERTICES] = {
-          { { glyph_x,           glyph_y           }, { tx,  ty  }, },
-          { { glyph_x,           glyph_y + glyph_h }, { tx,  ty2 }, },
-          { { glyph_x + glyph_w, glyph_y           }, { tx2, ty  }, },
-
-          { { glyph_x + glyph_w, glyph_y + glyph_h }, { tx2, ty2 }, },
-          { { glyph_x,           glyph_y + glyph_h }, { tx,  ty2 }, },
-          { { glyph_x + glyph_w, glyph_y           }, { tx2, ty  }, },
-        };
+      ops_draw (builder, (GskQuadVertex[GL_N_VERTICES]) {
+        { { glyph_x,           glyph_y           }, { tx,  ty  }, },
+        { { glyph_x,           glyph_y + glyph_h }, { tx,  ty2 }, },
+        { { glyph_x + glyph_w, glyph_y           }, { tx2, ty  }, },
 
-        ops_draw (builder, vertex_data);
-      }
+        { { glyph_x + glyph_w, glyph_y + glyph_h }, { tx2, ty2 }, },
+        { { glyph_x,           glyph_y + glyph_h }, { tx,  ty2 }, },
+        { { glyph_x + glyph_w, glyph_y           }, { tx2, ty  }, },
+      });
 
+next:
       x_position += gi->geometry.width;
     }
 }